{% extends 'users/user_profile.html' %}

<!-- 如何覆盖掉继承模板文件中原有的东西 -->


{% block title %}
<li class="is-active"><a>编辑用户</a></li> 
{% endblock  %}

{% block content %}

<!-- 官方文档： https://docs.djangoproject.com/zh-hans/3.2/topics/forms/ -->
<form action="{% url 'users:editor_users' %}" method="post" enctype="multipart/form-data">
    {% csrf_token %}
    <div class="field is-horizontal">
        <div class="field-label is-normal">
          <label for="{{ form.email.id_for_label }}" class="label">{{ form.email.label }}</label>
        </div>
        <div class="field-body">
          <div class="field">
            <div class="control">
                {{ form.email }}
            </div>
          </div>
        </div>
    </div> 
      {% for field in user_profile_form %}
      <div class="field is-horizontal">
          <div class="field-label is-normal">
            <label for="{{ field.id_for_label }}" class="label">{{ field.label }}</label>
          </div>
          <div class="field-body">
            <div class="field">
              <div class="control">
                 {{ field }}
              </div>
            </div>
          </div>
      </div>
      {% endfor %}
      <input class=" button is-primary is-pulled-right" type="submit" value="保存修改">
      <div class=" is-clearfix"></div>
      
  </form>
{% endblock %}
    